package p270jp.pxv.android.setting.presentation.activity;

import android.os.Bundle;
import androidx.activity.ComponentActivity;
import androidx.lifecycle.ViewModelLazy;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelStore;
import p060c2.Chain;
import p064c6.Preconditions;
import p089d.C2427i;
import p116e.AppCompatDelegate;
import p157fg.C3106e;
import p168g0.AbstractC3175g;
import p189gn.AbstractC3435a;
import p189gn.AbstractC3446l;
import p189gn.AbstractC3450p;
import p216hn.Lambda;
import p216hn.Reflection;
import p270jp.pxv.android.setting.presentation.flux.AppThemeSettingActionCreator;
import p270jp.pxv.android.setting.presentation.flux.AppThemeSettingStore;
import p325m0.MutabilityOwnership;
import p401ol.AbstractActivityC5461c;
import p445qf.C5830a;
import p450ql.AppThemeSettingEvent;
import p603wm.AbstractC6949c;
import p603wm.Unit;

/* compiled from: AppThemeSettingActivity.kt */
/* renamed from: jp.pxv.android.setting.presentation.activity.AppThemeSettingActivity */
/* loaded from: classes2.dex */
public final class AppThemeSettingActivity extends AbstractActivityC5461c {

    /* renamed from: v */
    public final AbstractC6949c f19311v = new ViewModelLazy(Reflection.m5499a(AppThemeSettingActionCreator.class), new C4318d(this), new C4317c(this));

    /* renamed from: w */
    public final AbstractC6949c f19312w = new ViewModelLazy(Reflection.m5499a(AppThemeSettingStore.class), new C4320f(this), new C4319e(this));

    /* compiled from: AppThemeSettingActivity.kt */
    /* renamed from: jp.pxv.android.setting.presentation.activity.AppThemeSettingActivity$a */
    /* loaded from: classes2.dex */
    public static final class C4315a extends Lambda implements AbstractC3450p<AbstractC3175g, Integer, Unit> {
        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4315a() {
            super(2);
            AppThemeSettingActivity.this = r1;
        }

        @Override // p189gn.AbstractC3450p
        public Unit invoke(AbstractC3175g gVar, Integer num) {
            AbstractC3175g gVar2 = gVar;
            if (((num.intValue() & 11) ^ 2) != 0 || !gVar2.mo6113t()) {
                C3106e.m6303a(false, C2427i.m7697k(gVar2, -819895529, true, new C4323c(AppThemeSettingActivity.this)), gVar2, 48, 1);
            } else {
                gVar2.mo6181A();
            }
            return Unit.f29503a;
        }
    }

    /* compiled from: AppThemeSettingActivity.kt */
    /* renamed from: jp.pxv.android.setting.presentation.activity.AppThemeSettingActivity$b */
    /* loaded from: classes2.dex */
    public static final class C4316b extends Lambda implements AbstractC3446l<C5830a<? extends AppThemeSettingEvent>, Unit> {

        /* renamed from: a */
        public static final C4316b f19314a = new C4316b();

        public C4316b() {
            super(1);
        }

        @Override // p189gn.AbstractC3446l
        public Unit invoke(C5830a<? extends AppThemeSettingEvent> aVar) {
            C5830a<? extends AppThemeSettingEvent> aVar2 = aVar;
            MutabilityOwnership.m3745m(aVar2, "it");
            AppThemeSettingEvent bVar = (AppThemeSettingEvent) aVar2.m2791a();
            if (bVar != null && (bVar instanceof AppThemeSettingEvent.C5849a)) {
                AppCompatDelegate.m7039z(Chain.m9939k(((AppThemeSettingEvent.C5849a) bVar).f25461a));
            }
            return Unit.f29503a;
        }
    }

    /* compiled from: ActivityViewModelLazy.kt */
    /* renamed from: jp.pxv.android.setting.presentation.activity.AppThemeSettingActivity$c */
    /* loaded from: classes2.dex */
    public static final class C4317c extends Lambda implements AbstractC3435a<ViewModelProvider.AbstractC0728b> {

        /* renamed from: a */
        public final /* synthetic */ ComponentActivity f19315a;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4317c(ComponentActivity componentActivity) {
            super(0);
            this.f19315a = componentActivity;
        }

        @Override // p189gn.AbstractC3435a
        public ViewModelProvider.AbstractC0728b invoke() {
            ViewModelProvider.AbstractC0728b defaultViewModelProviderFactory = this.f19315a.getDefaultViewModelProviderFactory();
            MutabilityOwnership.m3746l(defaultViewModelProviderFactory, "defaultViewModelProviderFactory");
            return defaultViewModelProviderFactory;
        }
    }

    /* compiled from: ActivityViewModelLazy.kt */
    /* renamed from: jp.pxv.android.setting.presentation.activity.AppThemeSettingActivity$d */
    /* loaded from: classes2.dex */
    public static final class C4318d extends Lambda implements AbstractC3435a<ViewModelStore> {

        /* renamed from: a */
        public final /* synthetic */ ComponentActivity f19316a;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4318d(ComponentActivity componentActivity) {
            super(0);
            this.f19316a = componentActivity;
        }

        @Override // p189gn.AbstractC3435a
        public ViewModelStore invoke() {
            ViewModelStore viewModelStore = this.f19316a.getViewModelStore();
            MutabilityOwnership.m3746l(viewModelStore, "viewModelStore");
            return viewModelStore;
        }
    }

    /* compiled from: ActivityViewModelLazy.kt */
    /* renamed from: jp.pxv.android.setting.presentation.activity.AppThemeSettingActivity$e */
    /* loaded from: classes2.dex */
    public static final class C4319e extends Lambda implements AbstractC3435a<ViewModelProvider.AbstractC0728b> {

        /* renamed from: a */
        public final /* synthetic */ ComponentActivity f19317a;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4319e(ComponentActivity componentActivity) {
            super(0);
            this.f19317a = componentActivity;
        }

        @Override // p189gn.AbstractC3435a
        public ViewModelProvider.AbstractC0728b invoke() {
            ViewModelProvider.AbstractC0728b defaultViewModelProviderFactory = this.f19317a.getDefaultViewModelProviderFactory();
            MutabilityOwnership.m3746l(defaultViewModelProviderFactory, "defaultViewModelProviderFactory");
            return defaultViewModelProviderFactory;
        }
    }

    /* compiled from: ActivityViewModelLazy.kt */
    /* renamed from: jp.pxv.android.setting.presentation.activity.AppThemeSettingActivity$f */
    /* loaded from: classes2.dex */
    public static final class C4320f extends Lambda implements AbstractC3435a<ViewModelStore> {

        /* renamed from: a */
        public final /* synthetic */ ComponentActivity f19318a;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4320f(ComponentActivity componentActivity) {
            super(0);
            this.f19318a = componentActivity;
        }

        @Override // p189gn.AbstractC3435a
        public ViewModelStore invoke() {
            ViewModelStore viewModelStore = this.f19318a.getViewModelStore();
            MutabilityOwnership.m3746l(viewModelStore, "viewModelStore");
            return viewModelStore;
        }
    }

    @Override // androidx.fragment.app.FragmentActivity, androidx.activity.ComponentActivity, p248j2.ActivityC3902g, android.app.Activity
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        p000a.ComponentActivity.m12285a(this, null, C2427i.m7696l(-985533378, true, new C4315a()), 1);
        Preconditions.m9798T(((AppThemeSettingStore) this.f19312w.getValue()).f19330g, this, C4316b.f19314a);
        ((AppThemeSettingActionCreator) this.f19311v.getValue()).m4557d();
    }
}
